package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.CategoryDTO;
import com.sky.dto.CategoryPageQueryDTO;
import com.sky.entity.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.DeleteMapping;

import java.util.List;

/**
 * PROJECT_NAME: sky-take-out
 * NAME: CategoryMapper
 *
 * @AUTHOR: zhang
 * DATE: 2023/11/22
 * DESCRIPTION :
 */
@Mapper
public interface CategoryMapper {
    Page<Category> getPage(@Param("dto") CategoryPageQueryDTO dto);

    void insert(@Param("category") Category category);

    void update(@Param("status") Integer status,@Param("dto") CategoryDTO dto);

    void delete(@Param("id") Long id);

    List<Category> selectCategoryByType(@Param("type") Integer type);
}
